// 1.引入vue
import Vue from 'vue'

// 2.引入VueRouter
import VueRouter from 'vue-router'
import Login from '../view/login/login.vue'
import Article from '../view/article/article.vue'
import List from '../view/list/list.vue'
import Register from '../view/register/register.vue'

//  3. 使用vue插件  vue的插件想要生效必须调用一个方法
Vue.use(VueRouter)

// 4.创建一个路由对象
const router = new VueRouter({
  routes: [
    {
      path: '/login',
      component: Login,
    },
    {
      path: '/list',
      component: List,
    },
    {
      path: '/article',
      component: Article,
    },
    {
      path: '/register',
      component: Register,
    }
]
}


)

// 5.导出
export default router
